package model.factory;

/*
 * BillingFactory.java
 * 
 * Created on 23/11/2007, 11:40:43 AM
 *  
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import model.mail.IMailSenderUtil;
import model.service.*;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 *
 * @author 
 */
public class RecreacionalFactory {

    private RecreacionalFactory() {
        ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"applicationContext.xml"});
        factory = (BeanFactory) context;
    }
    private static RecreacionalFactory singleton = null;
    private BeanFactory factory = null;

    public static RecreacionalFactory getInstance() {

        if (singleton == null) {
            singleton = new RecreacionalFactory();
        }
        return singleton;
    }

    public UsuarioService getUsuarioService() {
        return (UsuarioService) factory.getBean("usuarioService");
    }

    public ActaElectoralService getActaElectoralService() {
        return (ActaElectoralService) factory.getBean("actaElectoralService");
    }

    public CedulaVotacionService getCedulaVotacionService() {
        return (CedulaVotacionService) factory.getBean("cedulaVotacionService");
    }

    public ListaCandidatosService getListaCandidatosService() {
        return (ListaCandidatosService) factory.getBean("listaCandidatosService");
    }

    public MiembroListaService getMiembroListaService() {
        return (MiembroListaService) factory.getBean("miembroListaService");
    }

    public PadronElectoralService getPadronElectoralService() {
        return (PadronElectoralService) factory.getBean("padronElectoralService");
    }

    public MesaVotacionService getMesaVotacionService() {
        return (MesaVotacionService) factory.getBean("mesaVotacionService");
    }

    public PuestoService getPuestoService() {
        return (PuestoService) factory.getBean("puestoService");
    }

    public ReporteService getReporteService() {
        return (ReporteService) factory.getBean("reporteService");
    }

    public SolicitudAsambleaService getSolicitudAsambleaService() {
        return (SolicitudAsambleaService) factory.getBean("solicitudAsambleaService");
    }

    public SolicitudService getSolicitudService() {
        return (SolicitudService) factory.getBean("solicitudService");
    }

    public AsambleaService getAsambleaService() {
        return (AsambleaService) factory.getBean("asambleaService");
    }

    public ActaReunionService getActaReunionService() {
        return (ActaReunionService) factory.getBean("actaReunionService");
    }

    public SocioService getSocioService() {
        return (SocioService) factory.getBean("socioService");
    }

    public AsistenteAsambleaService getAsistenteAsambleaService() {
        return (AsistenteAsambleaService) factory.getBean("asistenteAsambleaService");
    }

    public MocionService getMocionService() {
        return (MocionService) factory.getBean("mocionService");
    }

    public EleccionService getEleccionService() {
        return (EleccionService) factory.getBean("eleccionService");
    }

    public EstatutoService getEstatutoService() {
        return (EstatutoService) factory.getBean("estatutoService");
    }

    public MiembroComiteElectoralService getMiembroComiteElectoralService() {
        return (MiembroComiteElectoralService) factory.getBean("comiteElectoralService");
    }

    public IMailSenderUtil getMail() {
        return (IMailSenderUtil) factory.getBean("mailSenderUtil");
    }
}
